package com.study.zouchao.superproject.login.model.impl;



import com.study.zouchao.superproject.base_zou.api_zou.Api_C;
import com.study.zouchao.superproject.login.contract.ILoginContract;
import com.study.zouchao.superproject.login.model.entity.result.LoginResult;
import com.study.zouchao.superproject.util.RxSchedulers;
import com.study.zouchao.superproject.util.api.api.Api;

import java.util.Map;
import rx.Observable;
import rx.functions.Func1;

/**
 * Created by Administrator on 2017/1/20.
 */

public class LoginModel implements ILoginContract.ILoginModel {

    @Override
    public Observable<LoginResult> login(Map<String, String> params) {
        return Api.getInstance(Api_C.BASE_URL_LIN_BASE).mApiService
                .loginByPOST(params)
                .map(RxSchedulers.<LoginResult>sleep(1500))
                .compose(RxSchedulers.<LoginResult>io_main());
    }

//    @Override
//    public Observable<LoginResult> login(Map<String, String> params) {
//        return null;
//    }
}
